package main

import (
)
import (
	"pokerface"
	"fmt"
)

func main() {
	pokerface.Play()
	//allTest()
	//pokerface.MakeDeckOfCards(false, "data/cards_no_lz.json")
}

var cores = 4
var result = []int{}
func t(core int, arr []int) {
	for i := 0; i < len(arr)/cores; i++ {
		fmt.Println(arr[i * cores + core])
		result = append(result, arr[i * cores + core])
	}
}

func allTest() {
	arr := []int{}
	for j := 0; j < 10; j++ {
		arr = append(arr, j)
	}
	for i := 0; i < cores; i++ {
		t(i, arr)
	}
	fmt.Println("result len:", len(result))
	//startT := time.Now().UnixNano()
	//for j := 0; j < 1000; j++ {
	//	testNewStruct()
	//}
	//total2 := time.Now().UnixNano() - startT
	//fmt.Println("testNewStruct:", total2, "ns")
	//
	//startT = time.Now().UnixNano()
	//for i := 0; i < 1000; i++ {
	//	testNewMap()
	//}
	//total1 := time.Now().UnixNano() - startT
	//fmt.Println("testNewMap:", total1, "ns")
	//
	//startT = time.Now().UnixNano()
	//for i := 0; i < 1000; i++ {
	//	testNewSlice()
	//}
	//total3 := time.Now().UnixNano() - startT
	//fmt.Println("testNewSlice:", total3, "ns")

	//arr := []string{"1", "2"}
	//test(arr)
	//fmt.Println("arr:", arr)
	//
	//x := new(tm)
	//x.i = 1
	//test2(x)
	//fmt.Println("x.i:", x.i)
	//
	//m := make(map[int]string)
	//m[3] = "qwe"
	//test3(m)
	//fmt.Println("m[3]:", m[3])
	//
	//s := "qqq"
	//test4(s)
	//fmt.Println("s:", s)
}

func testNewStruct() *tm {
	return new(tm)
}

func testNewMap() map[string]int {
	return make(map[string]int)
}

func testNewSlice() []string {
	return []string{}
}

func test4(s string) {
	s = "123"
}

func test(arr []string) {
	arr[0] = "q"
}

func test2(t *tm)  {
	t.i = 10
}

func test3(m map[int]string) {
	m[3] = "1321"
}

type tm struct {
	i int
}